# ---------------------------------------------------------------------------
# Author: Keith Hill
# Desc:   Prompt function that display full path on separate line from prompt.
#         It also displays history id, admin status as well as nesting level
#         for subshells.
# Date:   Nov 18, 2006
# Site:   http://www.codeplex.com/PowerShellCX
# Usage:  In your profile place the following command:
#  
#         . "$Env:PscxHome\Profile\EyeCandy.Keith.ps1"
# ---------------------------------------------------------------------------

# If you want to have a string always prefixed to the console
# window's title bar before the path, then set the variable
# $PscxCdWindowTitlePrefixPreference to the desired prefix.

$PscxCdWindowTitlePrefixPreference = "PoSh "

# If you do not want this function to update your console window's
# title bar then set $PscxCdWindowTitleUpdatePreference to $false.
# 
# $PscxCdWindowTitleUpdatePreference = $false

$Global:PscxForeColor = $null
$Global:PscxBackColor = $null
$Global:PscxPromptColor = $null
$Global:PscxRepeatPromptColor = $null

$Global:PscxMotDayPreference = $null

$Global:PscxHostTitlePreference = {
	# Update the Console Window Title Bar
	if (($PscxCdWindowTitleUpdatePreference -eq $null) -or 
	    ($PscxCdWindowTitleUpdatePreference)) 
	{
		$adminStatus = ""
		# Pretty much everyone runs as admin on XP and below so displaying
		# the admin status in the title bar is a waste of space.
		$isPreVista = ([System.Environment]::OSVersion.Version.Major -le 5)	
		if ($IsAdmin -and !$isPreVista) { $adminStatus = "Admin: " }

		$adminStatus + $PscxCdWindowTitlePrefixPreference + $(get-location)
	}
}

$Global:PscxPromptPreference = {
	param($nextCommandId) 
	
    # Determine what nesting level we are at (if any)
    $nestingLevel = ''
    if ($nestedpromptlevel -ge 1) {
        $nestingLevel = "[Nested:${nestedpromptlevel}]"
    }
    
    # Output prompt string
    "${nestingLevel}[$(Get-Location)]`n" +
    "${nextCommandId}>"
}

. "$Env:PscxHome\Profile\EyeCandy.ps1"